package com.touch.workshop.ui.expgrowth;
import java.awt.event.*;

import com.touch.workshop.Database;
public final class CurveGraphEvents implements MouseMotionListener
{
	public void mouseDragged(MouseEvent e) 
	{
		int selected = CurveControls.EXP_CURVE.graph.getItemIndex(e.getX());
		int exp = CurveControls.EXP_CURVE.graph.getItemValue(e.getY());
		
		if(selected > Database.MINLEVEL && selected < Database.MAXLEVEL)
		{
			if(exp < 0)
				exp = 0;
			Database.EXPCHART.set(selected, new Integer(exp));
			CurveControls.EXP_CURVE.graph.setItem(selected, exp);
			CurveControls.EXP_CURVE.graph.repaint();
		}		
	}

	public void mouseMoved(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

}
